﻿/**********************************************************************
 * @file   SelectPickModelDialog.h
 * @brief  选择拾取模式对话框
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2024-10-30
 *********************************************************************/
#ifndef _SelectPickModelDialog_H
#define _SelectPickModelDialog_H

#include "GUISubSystemDialogAPI.h"
#include "GUIWidget/GUIDialogBase.h"
#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Component/FITKAcousticsModel/FITKAbstractSEASubSys.h"

class QButtonGroup;

namespace Ui
{
    class SelectPickModelDialog;
}

namespace Core
{
    class FITKActionOperator;
}

namespace Acoustics
{
    class FITKAbstractSEASubSys;
}

namespace GUI
{
    /**
     * @brief FlatPlate create or edit widget
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-10-23
     */
    class GUISubSystemDialogAPI SelectPickModelDialog :public GUIDialogBase
    {
        Q_OBJECT;
    public:
        /**
         * @brief create object
         * @param[i]  obj            My Param doc
         * @param[i]  oper           operator
         * @param[i]  parent
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        SelectPickModelDialog(Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief Destroy object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        virtual ~SelectPickModelDialog();

    protected slots:
        /**
         * @brief  模式选择组动作
         * @param[i]  id
         * @return   void
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-01
         */
        void pickModelGroup_buttonClicked(int id);
        /**
         * @brief    基础元素选择组动作
         * @param[i] id 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-01
         */
        void baseElementGroup_buttonClicked(int id);
        /**
         * @brief    选择网格属性一致动作
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-27
         */
        void meshPropPickModel();
        /**
         * @brief    组选择动作
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-27
         */
        void groupPickModel();
        /**
         * @brief    拾取方向点数据
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-27
         */
        void on_pushButton_Pick_click();
        /**
         * @brief cencel button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief ok button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief    关闭槽
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        virtual void reject() override;

    protected:
        /**
         * @brief    初始化
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-12
         */
        void init();
        /**
         * @brief    拾取完成处理
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-01
         */
        void pickFinished();

    protected:
        /**
         * @brief ui object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Ui::SelectPickModelDialog* _ui = nullptr;
        /**
         * @brief 操作器对象
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Core::FITKActionOperator* _oper = nullptr;
        /**
         * @brief  子系统类型
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-12
         */
        int _subSysType{ 0 };
        /**
         * @brief  模式选择组
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-01
         */
        QButtonGroup* _pickModelGroup{};
        /**
         * @brief  基础元素选择组
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-01
         */
        QButtonGroup* _baseElementGroup{};
    };
}

#endif
